package com.ershi.spring.ioc.evnet;

import org.springframework.context.ApplicationEvent;

/**
 * @author 二十
 * @since 2021/10/30 6:40 下午
 */
public class MyEvent extends ApplicationEvent {

	String message;

	public MyEvent(Object source) {
		super(source);
	}

	public MyEvent(Object source,String message) {
		super(source);
		this.message=message;
	}

	public void print(){
		System.out.println("发布了一个事件："+message);
	}
}
